﻿@model KRM.Core.tblPersonalPosition
@{
    ViewBag.Title = "Edit Personal Position Info";
}
<form action="/Management/PersonalPositionInfo" method="POST" class="form-horizontal" id="frPersonalPositionInfo">
    @if (@Model.Id!=0){
     <input type="hidden" value="@ViewBag.PersonalId" name="PersonalId"/>
    <input type="hidden" value="@Model.Id" name="Id"/>
        <div class="form-body">
                    <div id="msg-personalpositioninfo"></div>
            <div class="row">
                <div class="col-md-12">
                    <div class="note note-info">
           
                        <h4 class="block">Emloyees : @Model.tblPersonalRequest.FullName</h4>
                        <p>
                            Personal position info will has been save history when you update.
                        </p>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-12">Job Title</label>
                        <div class="col-md-12">
                            <textarea type="text" rows="2" name="JobTitle"class="form-control" required="required" value="@Model.JobTitle"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">Department</label>
                        <div class="col-md-9">
                            @Html.DropDownList("DepartmentId",null,new {@class="form-control"})
                        </div>
                    </div>
               
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">Position</label>
                        <div class="col-md-9">
                            @Html.DropDownList("PositionId",null,new {@class="form-control"})
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">Start Date</label>
                        <div class="col-md-9">
                            <div id =""class="input-group  date date-picker" data-date="@DateTime.Now" data-date-format="mm/dd/yyyy" data-date-viewmode="years"style="width: 100%">
                                <input type="text" name="StartDate" class="form-control"required="required"placeholder="mm/dd/yyyy" value="@Model.StartDate.ToString("MM/dd/yyyy")" >
                                <span class="input-group-btn">
                                    <button class="btn default" type="button"><i class="icon-calendar"></i></button>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">End Date</label>
                        <div class="col-md-9">
                            <div id =""class="input-group  date date-picker" data-date="@DateTime.Now" data-date-format="mm/dd/yyyy" data-date-viewmode="years" style="width: 100%">
                                <input type="text" name="EndDate" class="form-control"required="required"placeholder="mm/dd/yyyy" value="@Model.EndDate.ToString("MM/dd/yyyy")" >
                                <span class="input-group-btn">
                                    <button class="btn default" type="button"><i class="icon-calendar"></i></button>
                                </span>
                            </div>
                        </div>
                    </div>
                </div></div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">Rate Of Pay</label>
                        <div class="col-md-9">
                            <input type="text" name="RateOfPay"class="form-control" value="@Model.RateOfPay">
                        </div>
                    </div></div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-3">Hours Of Work</label>
                        <div class="col-md-9">
                            <input type="text" name="HoursOfWork" class="form-control"value="@Model.HoursOfWork">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <div class="form-actions fluid">
        <div class="row">
            <div class="col-md-6">
                <div class="col-md-offset-3 col-md-9">
                    <button type="submit" class="btn btn green"><i class="icon-ok"></i>Save Changes</button>
                    <button type="reset" class="btn btn-default">Reset</button>                              
                </div>
            </div>
            <div class="col-md-6">
            </div>
        </div>
    </div>
}
else
{
    <input type="hidden" value="@ViewBag.PersonalId" name="PersonalId"/>
    <input type="hidden" value="0" name="Id"/>
    <div class="form-body">
        <div id="msg-personalpositioninfo"></div>
        <div class="row">
            <div class="col-md-12"> 
                <div class="note note-success">
                    <h4 class="block">Personal Positon Info Is Empty</h4>
                    <p>
                        Plese Modify Personal position info.
                    </p>
                </div></div></div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="control-label col-md-12">Job Title</label>
                    <div class="col-md-12">
                        <textarea type="text" rows="2" name="JobTitle"class="form-control" required="required" value=""></textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Department</label>
                    <div class="col-md-9">
                        @Html.DropDownList("DepartmentId",null,new {@class="form-control"})
                    </div>
                </div>
               
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Position</label>
                    <div class="col-md-9">
                        @Html.DropDownList("PositionId",null,new {@class="form-control"})
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Start Date</label>
                    <div class="col-md-9">
                        <div id =""class="input-group date date-picker" data-date="@DateTime.Now" data-date-format="mm/dd/yyyy" data-date-viewmode="years"style="width: 100%">
                            <input type="text" name="StartDate" class="form-control"required="required"placeholder="mm/dd/yyyy" value="@DateTime.Now.ToString("MM/dd/yyyy")" >
                            <span class="input-group-btn">
                                <button class="btn default" type="button"><i class="icon-calendar"></i></button>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">End Date</label>
                    <div class="col-md-9">
                        <div id =""class="input-group  date date-picker" data-date="@DateTime.Now" data-date-format="mm/dd/yyyy" data-date-viewmode="years"style="width: 100%">
                            <input type="text" name="EndDate" class="form-control"required="required"placeholder="mm/dd/yyyy" value="@DateTime.Now.ToString("MM/dd/yyyy")" >
                            <span class="input-group-btn">
                                <button class="btn default" type="button"><i class="icon-calendar"></i></button>
                            </span>
                        </div>
                    </div>
                </div>
            </div></div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Rate Of Pay</label>
                    <div class="col-md-9">
                        <input type="text" name="RateOfPay"class="form-control" value="0">
                    </div>
                </div></div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Hours Of Work</label>
                    <div class="col-md-9">
                        <input type="text" name="HoursOfWork" class="form-control"value="8">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-actions fluid">
        <div class="row">
            <div class="col-md-6">
                <div class="col-md-offset-3 col-md-9">
                    <button type="submit" class="btn btn green "><i class="icon-ok"></i>Save Changes</button>
                    <button type="reset" class="btn btn-default">Reset</button>                              
                </div>
            </div>
            <div class="col-md-6">
            </div>
        </div>
    </div>

}
</form>